<?php

/*
 * @copyright :     Ienter asia Technologies
 * @author :        Quyet
 * @version         v.1.0
 * @created         01/7/2014
 * @Description :   Controller leave type
 */
session_start();

class My_Exceptions extends CI_Exceptions {

    function My_Exceptions() {
        parent::__construct();
    }

    /**
     * General Error Page
     *
     * @access    private
     * @param    string    disabled - there to keep ci happy
     * @param    string    ditto for this one
     * @param    string    the error function name
     * @return    string
     */
    function show_error($heading, $message, $template = 'error_general', $status_code = 404) {
        $data = array(
            'heading' => $heading,
            'message' => $message,
            'template' => $template,
            'status_code' => $status_code
        );
        $_SESSION['errorPage'] = $data;
        header("Location: http://" . $_SERVER['HTTP_HOST'] . '/error-page');
    }

}
